<?php
/*
 * @o: ========================================================
 * @Created By: VsCode
 * @Author: Fu
 * @name: 管理员控制器
 * @LastEditTime: 2021-05-13 11:48:25
 * @Date: 2021-05-11 10:57:49
 * @u: ========================================================
 */

namespace app\admin\model;

use think\Model;


class Shopping extends Model
{

    

    

    // 表名
    protected $name = 'shop_cart';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;
    protected $resultSetType = 'collection';

    // 追加属性
    protected $append = [

    ];

    public function goods()
    {
        return $this->belongsTo('Goods', 'goods_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
